EN FR
EN FR


Section: Software

The TRAIAN Compiler

Participants : Hubert Garavel [contact person] , Frédéric Lang.

We develop a compiler named Traian for translating descriptions written in the Lotos NT language (see §  3.2 ) into C programs, which will be used for simulation, rapid prototyping, verification, and testing.

The current version of Traian performs lexical analysis, syntactic analysis, abstract syntax tree construction, static semantics analysis, and C code generation for Lotos NT types and functions.

Although this version of Traian is still incomplete (it does not handle Lotos NT processes), it already has useful applications in compiler construction [8] . The recent compilers developed by the Vasy project team — including Aal , Evaluator  4.0 (see §  6.1.6 ), Exp.open  2.0 (see §  6.1.4 ), Lnt2Lotos (see §  6.2.2 ), Ntif (see §  3.2 ), Pic2Lnt (see §  6.2.3 ), and Svl (see §  6.1.4 ) — all contain a large amount of Lotos NT code, which is then translated into C code by Traian .

Our approach consists in using the Syntax tool (developed at Inria Rocquencourt) for lexical and syntactic analysis together with Lotos NT for semantical aspects, in particular the definition, construction, and traversal of abstract trees. Some involved parts of the compiler can also be written directly in C if necessary. The combined use of Syntax , Lotos NT , and Traian proves to be satisfactory, in terms of both the rapidity of development and the quality of the resulting compilers.

The Traian compiler can be freely downloaded from the Vasy Web site (see http://vasy.inria.fr/traian ).